package guitk;

import java.awt.GridBagConstraints;
import java.util.Locale;
import java.util.ResourceBundle;

public class UIConstraints {

	public static final int F = 1000;
	public static final int M = 100;
	public static final int L = 10;
	public static final int N = GridBagConstraints.NONE;
	public static final int B = GridBagConstraints.BOTH;
	public static final int H = GridBagConstraints.HORIZONTAL;
	public static final int V = GridBagConstraints.VERTICAL;
	public static final int CR = GridBagConstraints.CENTER;
	public static final int PS = GridBagConstraints.PAGE_START;
	public static final int PE = GridBagConstraints.PAGE_END;
	public static final int LS = GridBagConstraints.LINE_START;
	public static final int LE = GridBagConstraints.LINE_END;
	public static final int TS = GridBagConstraints.FIRST_LINE_START;
	public static final int TE = GridBagConstraints.FIRST_LINE_END;
	public static final int BS = GridBagConstraints.LAST_LINE_START;
	public static final int BE = GridBagConstraints.LAST_LINE_END;

	public static String get(String name, UIConfig config) {
		Locale locale = null;
		if (config.getLanguage().equalsIgnoreCase("en")) locale = new Locale("en", "US");
		if (config.getLanguage().equalsIgnoreCase("el")) locale = new Locale("el", "GR");
		if (locale == null) return "unconfigured";
		return ResourceBundle.getBundle("resources.MessageBundle", locale).getString(name);
	}

}
